<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://amc.af.mil/portal-el" prefix="portal" %>
<%@ taglib uri="http://amc.af.mil/radtaglibrary" prefix="rad" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html-el" %>
<html>
<head>
    <title>Assigned ADPE Discrepancy Report</title>
</head>

<body>

<rad:useBean id="organizationViewHelper"/>
<rad:useBean id="userViewHelper"/>

<div id="portal-left-bar">
    <jsp:include page="../navigation/navigationMenu.jsp"/>
</div>

<div id="portal-content">
    <portal:box title="ADPE Discrepancies" style="width: 800px">
        <portal:subSection title="Report Options">
            <html:form action="report/discrepancyReportOptions.do" method="post">
                <%--<html:form action="report/discrepancyReportOptions.do" method="post">--%>
                <p>
                    <label for="organizationId">Organization</label>
                    <html:select property="organizationId" styleId="organizationId"
                                 value="${requestScope.organizationId}">
                        <html:optionsCollection name="organizationViewHelper"
                                                property="all"
                                                label="name"
                                                value="id"/>
                    </html:select>
                </p>

                <p>
                    <label for="noAssignedEquipment">Show Users With No Assigned Equipment</label>
                    <html:checkbox property="noAssignedEquipment" value="1"/>
                </p>

                <p>
                    <label for="noAssignedCpu">Show Users With No Assigned CPU</label>
                    <html:checkbox property="noAssignedCpu" value="1"/>
                </p>

                <%-- <p>
                    <label for="noAssignedMonitors">Show Users With No Assigned Monitor</label>
                    <html:checkbox property="noAssignedMonitors" value="1"/>
                </p>--%>

                <p><html:submit value="Display Report"/></p>
            </html:form>
        </portal:subSection>
        <c:if test="${requestScope.noAssignedEquipment eq 1}">
            <portal:subSection title="No Assigned Equipment">
                <display:table name="userViewHelper.usersWithNoAssignedEquipment"
                               style="width:100%"
                               id="user">
                    <display:column title="Name">
                        <c:out value="${user.displayName}"/>
                    </display:column>
                    <display:column title="Actions" style="width: 150px">
                        <html:link href="viewUserProfile.do?userId=${user.id}">Profile</html:link>
                    </display:column>
                </display:table>
            </portal:subSection>
        </c:if>
        <c:if test="${requestScope.noAssignedCpu eq 1}">
            <portal:subSection title="No Assigned CPU">
                <display:table name="userViewHelper.usersWithNoAssignedCpu"
                               style="width:100%"
                               id="user">
                    <display:column title="Name">
                        <c:out value="${user.displayName}"/>
                    </display:column>
                    <display:column title="Actions" style="width: 150px">
                        <html:link href="viewUserProfile.do?userId=${user.id}">Profile</html:link>
                    </display:column>
                </display:table>
            </portal:subSection>
        </c:if>
        <%--        <c:if test="${requestScope.noAssignedMonitors eq 1}">
            <portal:subSection title="No Assigned Monitors">

            </portal:subSection>
        </c:if>--%>
    </portal:box>
</div>
</body>
</html>